package cn.niit.service.impl;

import cn.niit.dao.UserDao;
import cn.niit.service.UserService;

public class UserServiceImpl implements UserService {

   // private UserDao userDao = new UserDaoImpl();
    //添加用户
    private UserDao userDao;

    public UserDao getUserDao() {
        return userDao;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public int addUser() {
        return userDao.insert();
    }

    @Override
    public int delUser() {
        return userDao.delete();
    }

    @Override
    public int updateUser() {
        return userDao.update();
    }

    @Override
    public int searchUser() {
        return userDao.search();
    }

    @Override
    public String toString() {
        return "UserServiceImpl{" +
                "userDao=" + userDao +
                '}';
    }
}
